// spGuiListBox.js

jQuery(document).ready(function(){

	jQuery(document).on( "click", ".spGuiListBoxItem", function(event){

		jQuery(this).closest( ".spGuiListBox" ).find( ".spGuiListBoxItem" ).each(function(){
			jQuery(this).css({
				"background-color" : "transparent",
				"color" : "black"
			});
			
			jQuery(this).attr( "data-selected", "false" );
		});
		
		jQuery(this).css( "background-color", "black" );
		jQuery(this).css( "color", "white" );
		jQuery(this).attr( "data-selected", "true" );
	});
	
});